package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpYourAccountCustomerUserTabNewUserPageUtil extends SeleniumPageUtil {
	public static final By YANU_SPAN_NEW_MESSAGE = By.id("ctl44_lblMessage");
	public static final By YANU_INPUT_USER_NAME = By.id("ctl44_txtUserName");
	public static final By YANU_INPUT_FIRST_NAME = By.id("ctl44_txtFirstName");
	public static final By YANU_INPUT_LAST_NAME = By.id("ctl44_txtLastName");
	public static final By YANU_INPUT_EMAIL_ADDRESS = By.id("ctl44_txtEmailAddress");
	public static final By YANU_BUTTON_SUBMIT = By.id("ctl44_cmdSubmit");
	
	public static void waitForPageToLoad(){
		SeleniumUtil.waitOnElements(new By[]{
				YANU_SPAN_NEW_MESSAGE, YANU_INPUT_USER_NAME, YANU_INPUT_FIRST_NAME, YANU_BUTTON_SUBMIT
		});
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(YANU_SPAN_NEW_MESSAGE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(YANU_INPUT_USER_NAME));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(YANU_INPUT_FIRST_NAME));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(YANU_INPUT_LAST_NAME));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(YANU_INPUT_EMAIL_ADDRESS));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(YANU_BUTTON_SUBMIT));
	}
}
